<?php
namespace app\common\validate;

use think\Validate;

class DictValidate extends Validate
{
    // 验证规则
    protected $rule = [
        'dict_name|字典名称' => 'require',
        'type_id|字典分类'   => 'require|number',
    ];
    //验证场景
    protected $scene = [
        'add'  => ['dict_name', 'type_id'],
        'edit' => ['type_id'],
    ];
}